jeudi 11 août 2016

تثبيت فيس بووك ماسنجر [on hold]

التطبيق يحمل بس ما يتثبت فيالجهاز

How to cast an Object to an int in java?

How can I cast an Object to an int in java?

How to open the AVD manager on Ubuntu Linux from the command line?

How to open the AVD manager on Ubuntu Linux from the command line?

Center message in android dialog box

I want the message text within my dialog box to be center aligned.

Developing Android apps using assembly language

How do I develop Android apps using assembly language, either in Windows or Linux?

Android: ScrollView force to bottom

I would like a ScrollView to start all the way at the bottom. Any methods?

How to tell Eclipse Workspace?

Is there a way to tell what is the current Eclipse workspace you are currently working on?

Is it possible to access two server through an android app?

Is it possible to access two server through an android app or how to connect two servers at a time ?

mercredi 10 août 2016

In which scenario we have to define a variable in interface?

Is there any special scenario that we have to define a variable in interface. If so explain with some examples.

Read NFC-Service of android phone

How to read NFC-Service of android phone through JNI? I want to read card with android phone.

Thank You.

When migrate from GCM to FCM then it shows errors in map & google map when replace the compile by FCM

compile 'com.google.android.gms:play-services:9.0.0' //replace to

compile 'com.google.firebase:firebase-messaging:9.0.2'

Can multiple android application access same firebase database?

Is it possible for multiple android applications to access a single firebase backend. If no what is the alternative in such situation?

Is it possible to prevent Firebase's onDataChange() from being triggered initially?

Is it possible to make onDataChange() not be triggered just as you set the listener and instead only when the actual data changes?

How could I calculate the SHA-3-512 of a String in Android?

I need to send to a remote database the SHA-3-512 of a password from an Android application. How could I do that?

Sometimes unable to load url in webview

after call webview loadUrl,another webview instance load a javascrit;the issue is sometimes loadUrl do nothing.

my English is poor,sorry...

Android Enable TLSv1.2 in OKHttp

i am using OKHttp for my project. i want to enable TLSv1.2 for my service call. can any body tell me how to enable it.

String : How many objects would be created

String x="hello";
String s;
for(int i=0;i<10;i++)
{
    s=new String("hi");
}

Here how many objects would be created?

Where can I learn how to make an android app?

online courses are very complicated and I don't know how to lean that. I am beginner for android and I'm looking for a course for beginners

how to show confirmation dialogue box on mobile back button in android app?

I want to set confirmation dialogue box when user press back button of mobile. There should be asked from user that "Do you want to exit?".

Java program to convert bulk avro files to CSV file

Can anyone please help me to find java code to convert bulk avro files in HDFS directory to csv file. your inputs would be highly appreciated. Thanks!

how to ensure JMS listener is up without using jconsole?

I Created Java message listener, how to monitor or alert when listener is down. I have tried with JConsole is there any other way I should use.

Is there any API for making navigator in google map in android?

I want to make an android application using google map but I want to make an automatic navigator from source to destination location. Thanks for your help.

Is there any example/resource where i can learn multiform/wizard in spring MVC? [on hold]

I am new to spring MVC and read that AbstractWizardFormController has been deprecated, so just want to learn the same tech with new method available now in Spring 4.

how do I iterate though a java list in stringtemplate?

I want to iterate through a hibernate query results inside stringtemplate. I've been looking for examples but I can't find anything.

can you please help? thanks

Android development software for ubuntu linux

I currently moved from windows to ubuntu-linux. So I want to know what would be the best software for making android applications aside from android-studio for ubuntu-linux OS

File downloads as html instead of file I want to download, how to fix this?

I want to write a download service on android. However when I tried it, it downloads files as HTML not as .jpg for example. How do I fix it ?

JTextField enter 3 letters and 3 numbers

Hi I'm working on a project where a JTextField enter 3 letters and 3 numbers correlative first letters after the numbers, how I can fix it? I work in Java Netbeans

Confused, where is onCreateView method in MainActivity?

i followed online tutorial on how to create android app. i want to assign variable in onCreateView, but where is the method? im using androidstudio latest btw. please help

How can I get the list of mounted external storage of android device

Here we are developing android app for android TV box. How can I get the list of mounted external storage like USB stick, SDCARD and SATA HDD.

Braintree: Submit button color change

There is a submit button with a default bluish color appearing. I want to change it to purple color. Any idea how it can be done for Braintree Android ?

Stop call to onEndOfSpeech when converting speech to text in Android

Is there any way to stop the call to onEndOfSpeech when converting speech to text, so the user will be able to speak whenever he wants to?

is it possble to find field or method usage with annotation processor during compile time?

I'm trying to find all the assignment of a field with specific annotation, and replace it with setter method, is it possible during the compile time with annotation processor?

mardi 9 août 2016

How to plot 3D Graph in open Gl in Android.?

Hello guys i want to plat point in openGL but unable to do please suggest me the best way to plot the points to create 3D graph in open GL.

Get the list of all spreadsheets associated with Google account using Sheets API v4

Using Google Sheets API v4, I am looking to get the list of spreadsheets attached to my account. I did much research but have not found any solutions for that.

What does System.out.printf( "%-15s%03dn", s1, x) do?

String s1=sc.next();
int x=sc.nextInt();
System.out.printf( "%-15s%03dn", s1, x);

Can someone explain the part inside the 'printf' braces?

Xamarin AdMob for Android - Catch Exceptions

I've implemented AdMob on Xamarin Android. I want to add some code when the ad is loaded, and I want to catch AdMob's exceptions.

How can I do that?

Calling a constructor without mentioning the class name

What happens if we do below:-

c1 = new Car();

Here Car is a class and Car() is obviously a constructor.

How to prevent fragmentation in Java?

I have an interview and I was ask how to prevent Memory Fragmentation in Java. Can Anyone summarize how Java deal with it ? I've read some documents but it very complicated.

grapheme_stripos equivalent for JAVA

So i was wondering whether there was a JAVA equivalent or any work around of grapheme_stripos and mb_strtolower(String, 'UTF-8'). Just using Core JAVA.

How to create add to cart session like Amazon in android?

Hi I Have the GridView images and text I want to create add to cart session like amazon Actually i can try controller but i dont get exact value like amazon.

How to disable a button in a remote view?

I can make it invisible using the code below, but can't disable it.

RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.notification);
contentView.setViewVisibility(R.id.buttonToDisable, View.INVISIBLE);

Float and Double Objects in Java

Why does Float and Double Objects in Java does not support conversion to binary like Integer?

Ex:

 Integer.toBinaryString(200)

Ans:

 11001000

Does every android phone has download app installed by default on their phone?

After clicking on a button I would like to start the default Download application. Will this work on every phone or at least on the majority of the phones?

Thanks.

504 gateway timeout auto refresh page

Is it possible to add some code that if the page times out (due to my shared host being over loaded) I can refresh the page on getting the error "504 gateway timeout"

How to create values folder for specific width device

How do i create specific res values folder for different device resolution and how can i identify that this device comes under specific category of density.

Thank you for help.

Convert predicate<T> to javax.persistence.criteria.CriteriaQuery.expression

How to convert

pet -> pet.getColor() == null - Lambda

to

pet.get(Pet_.color).isNull() - Criteria query

In java.

Regards

Java How to assign a pawn to a player

I am bussy with a project and I don't have any idea how to assign a pawn to a player. I am coding in java. So does some know how to do this

How to stop Waze from playing sound alerts in Android, quickfix [Solved] [on hold]

If you have bluetooth on and set it to alerts only you still get tons of notifications in Waze like Animals on Shoulder, Vehicle Stopped on Shoulder, and the super loud recalculating route sound.

Error running: Project has no JDK configured in IntelliJ IDEA Ultimate

When I try to execute program ergo, it gives me an error.

Error running: Project has no JDK configured

Can anybody help me? I'm newbie in IntelliJ IDEA.

How does one add multiple rows to an array list in java?

I have a String[] (a string array) that has multiple values at its different indexes. Now I want to add this complete array of strings to a single index of an array list (ArrayList).

Gradle Project Sync failed after GitLab VCS implementation

After moving my Android project to a new local location, and migrating my Android project to a git VCS I am experiencing a Gradle project sync failed error in all of my java files.

Android Studio exception raised during rendering

exception raised during rendering android.graphics.drawable.VectorDrawable_Delegate.nDraw(JJJLandroid/graphics/Rect;ZZ)I How can i fix it? I dont want to reinstall it. I update AS and this exception was raised.

Android : how to set animation in camera?

I want to be put in the animation display camera randomly after down Scanne_bar ...like this photos enter image description here

Is it possible to detect incoming texts on phone with java

I am looking to listen to a phone number(mine) and flash a light when I recive a text message. Is there a way to do this in java or any programming language at all?

Linkedin to share a post by url

Some one tell me how to construct an URL format to share a post in linkedin company page, and also to give comment for a post...Since I got the Oauth2 accesstoken from the linkedin.

lundi 8 août 2016

Failed binder transaction when putting an bitmap dynamically in a widget

Can anybody tell me the reason for failed binder transaction error? I can see this error message in logcat. I am getting this error while trying to put an bitmap dynamically in a widget...

How to send Firebase Notifications from website to Android

What is the best way to send push notification to all of my users in Android. I have Firebase and now I'm using their backend website, but I want to do it by php or something.

InputStreamReader(InputStreamReader(System.in,"ISO-8859-15")) reads "ő" as "õ"

First, I read from file. Reading is fine ő.

Then, I enter ő in console and if I compare them I got false. I want ő with console reading as well.

Is it possible to embed the floating action button into the action bar?

I want to get something like this. Is it possible?

enter image description here

Android : How can I pause the main thread till AsyncTask completes?

I am calling an asynctask from the main thread of my Android application. However, I need to pause the main thread till the time the async task is over. Can someone suggest how to do this?

How to write code for insertion and deletion of table data with many buttons from front-end?

I write code for one web page in jsp. Here, it shows the table values. Every table row contain two buttons. One for deletion, another for insertion of another table. How can I handle this situation?

How do I make an image that is positioned to float left, float center when screen size is reduced to tablet resolution or lower

On my template I want my logo to be positioned left.

When screen is reduced to tablet resolution or lower I want my logo image to be centered.

How can I accomplish this?

How can I use the same fragmentinstance more than one place

I have 3 places with the same Fragment, and I want that all the 3 Fragments will be the same (Every change in one of the Fragments will change the others), How can I use the same fragmentinstance?

Need to print top three values in console

I just found elements (around 100 float values) via XPath and printed them on console using System.Out.. Now I need to sort them and print top three values from them. Please help me in this regard. Thanks

How to add Nexus 9 in AVD manager?

M preview supports devices like nexus 5, nexus 6, nexus 9 but unfortunately in my AVD manager none of these are listed. So how to add these virtual devices in my AVD manager virtual devices?

Thanks in advance..

How can i identify email inside a text paragraph?

Example text : "jhon's email address is jhon@gmail.com"

How can i read this text using c# or java and identify jhons email? Using information extraction process. Any tips?

Expected result : jhon@gmail.com

how can i migrate my android application from Cordova for Android 4.1.1 to higher version

For my existing android application i got the warning from google play store that i need to migrate my application from Cordova for Android 4.1.1 to higher version ? Could anyone help please to get the solution? Thanks in advance

com/android/dx/command/dexer/Main : Unsupported major.minor version 52.0

how to fix com/android/dx/command/dexer/Main : Unsupported major.minor version 52.0

pic of error when i click on Run as android application

Can someone explain the backend functioning of this program, why is default constructor of parent class invoked?

//super class
class parent{int a = 5;}

//sub class
class child extends parent{
    int a = 10;
    void method(){
        System.out.println(a);
    }
}

//main class
class test{
    public static void main(String[] s){
        child c = new child();
        c.method;
    }
}

android: webview.loadUrl("javascript:(function() { ... }") vs webview.evaluateJavascript(...)

As I understand, there are two ways to inject JS execution onto current page in Android webview. I'm wondering if there are pros/cons of one over the other except that webview.evaluateJavascript(...) provides a call back? Thanks.

How to parse JSONArray without JSONObject in Android

I have a trouble finding a way how to parse JSONArray in Android. It looks like this:

[70.0,40.0,30.0,20.0,10.0,30.0,90.0]

There is just JSONArray not JSONObject.

Can somebody please help me?

Thank you!

Libgdx FIleHandleResolver of TmxMapLoader does not try to resolve tile files

I implement interface of FileHandleResolver, initialize TmxMapLoader with it. Loader requests FileHandle of tmx file than throws exception on missing first tile. I specifically wanted loader to ask for missing tiles, not throwing and aborting. Is it possible?

Technical differences between Spring Data JPA's findFirst and findTop

I recently started working with Spring data jpa. It would be highly appreciable if somebody could throw some light on the technical differences between Spring Data JPA's findFirst and findTop. Differences, usages.

Thanks

How to reward user after installing app form rewarded video

I am using rewarded video service from Admob and the users are rewarded when the video ends.

I want to reward users only after the user installed the app from the video. How can i do that?

How to generate only required fields from xsd using JAXB - apache cxf?

I need only the required fields to be in my java classes from xsd. so i want to generate java classes from xsd using jaxb or apache cxf,but only required fields.how can we do this?suggest me.

How to ignore whitespaces in java DOM

I'm trying to read a file to produce a DOM Document but the file has whitespaces and newlines. I'm trying to ignore them, but I couldn't:

dbFactory.setIgnoringElementContentWhitespace(true);

What can I do?

when to create a copy of the passed in argument inside method and when to not

I'm new to java and I was wondering under what kind of circumstances should we create a copy of the passed in argument inside the method, and when should we not? Thanks in advance for any suggestions and help!

How to open full article page from webview >android

I created rss feed app but in feed it display only short description of article and give an link to title in feed site and i want to get this link to redirect to browser . how to do it? ?

Android Leanback library BrowseFragment

I want to use a BrowseFragment inside an activity along with another fragment. The purpose of the other fragment is to have a listview, on each selected item the BrowseFragment will be reloaded with new data. Is this recommended?

Using loop or else to set Imageview using array

I have two arrays and two ImageViews. I would like to set the arrays as images in the respective ImageViews. Condition, using loop or else to set images into imageview. both arrays having 2 images.

dimanche 7 août 2016

how to get workspace path in eclipse? [closed]

I am doing to study about PDE(Eclipse Plugin Project).

I need to get workspace path.

My text widget(swt) should to be set current workspace path.

How to get workspace path in eclipse?

I Need to acess Spreadsheet which we stored in google drive in java/android

Hi I have checked every example But still am not able to access can you please provide me the proper scenario to follow ...either in java or android it is helpful if it is android.

Thanks in advance.

How to read a class file from an extracted jar file?

I want to read a .class file that is located inside one of the jars included in my class path. How can I read a readable .class file from a .jar package?

Device frame that wrap the video

I'm looking for a plugin to make a device frame that wrap the video onto it. Haven't got luck to find any this far.

Eg: Sample of device frame

Get the seconds number from timestamp

I can get the seconds from a time stamp with this command long timestamp = System.currentTimeMillis() / 1000; From this time stamp 1465731398013 I will get this result 1465731398. What I need is only the last number, 8 in this case.

Kivy to android app creation

I have a kivy app(pretty large). I want to make that work in android devices. I tried using buildozer to convert the kivy app to a .apk file but the app doesn't open. What would be my best bet?

Nexus 9 Emulator not showing in AVD

Nexus 9 emulator is not showing on avd. I have updated my adt and sdk manager. Emulated android tv and other device are showing. But nexus 9 isn't showing. Can you please tell me which emulator is running on nexus 9

All avilable IT skills list is needed

We are developing a small in-house project, we need to display all available IT SKILLS in a list. Is there a way to get list of IT SKILLS like Java , j2ee, rest webservices, .net, etc etc

Regards, Mallikarjuna

How to Generate AST of C# and java code as input

I am building an application that will get C# code as input and give output the AST of the given code. Provide me a proper way to extract this AST(Abstract Syntax Tree) of input C# code rather than compiling it.

How to change Bundle ID if I only have the APK

I want to change my Bundle ID of an app, but I only have the APK and not the source code. How could I change from "com.mycompany.mygame" to "com.mycompany2.mygame" or "com.mycompany.mygame" to "com.mycompany.mygame2" ?

How does Samsung Note achieve the process of having two apps open at the same time?

How does The note have two apps open at same time? Like you can use half a screen for 1 app and same for the other.

As far as I remember android cannot have more than 1 app active on screen?

how to use session in android

I read shared preference is used as a session for small data storage. I would like to know , what are the way to manage session in android and which is more efficient and useful way to use session. please guide me.

Building jar file for maven

How can we create a jar file for maven repository. If I do an extraction on such jars, it contains only two folders, one is a "META-INF" folder and the other is the package structure. How to build such jar file?

How to compress 2 apk files in just one?

All is in the title just want to compress 2 apk files in one Exemple: I have google play services and google play and I compress them into one apk and this apk will install google play services and google play store

How to use now Time in android studio

am c# developer and in c# you can use datetime.now to get this time as example but in android studio i do not know how to do that can you help me please . not I need just hour and minute thanks

JPA native query with blob converting blob results to question marks when text contains multi languages

JPA native query with blob converting blob results to question marks when text contains multi languages like below. "description" : "??????"

Tried encoding like below. But still same issue. String xmlFile=new String(xmlBytesArray, "UTF-8");

Any help would be appreciated.

is it a free platform for android app like cms for website?

excuse me for my poor English.

is it a free platform for android app like cms for website?

it is very important the APP be dynamic , for example users can register and post there content,picture and video?

Online compiler for java web application

There are several online Java compilers for standalone applications (eg: This link), Is there any compiler to compile and run Java web applications. please share your ideas if so.

How to fix a bug for specific device?

I am developing game in Unity on C# and when my friend testes he said that he had had a problem which. I've done the same steps but hadn't found that problem.

How to fix a bug for specific device?

apk size is increased due to armeabi file having .so files.How to decrease it?

I have developed an application using JNI. When I am using JNI Native libraries it will automatically generate .so files, because of these files my application size will increase.

Could anyone suggest how to decrease the size of these .so files ?

How to detect when an Android app goes to the background and come back to the foreground

I am trying to write an app that does something specific when it is brought back to the foreground after some amount of time. Is there a way to detect when an app is sent to the background or brought to the foreground?

How to specify the text color whenever i write a particular word in JTextPane

Is there a way to specify what color I want a particular text to have whenever i write it. lets say i set "Apple" to Color red. if I write "this Apple is good Apple" in any JTextPane, the word "apple" turns red.

Sending apk file with Telegram

I need to sending my application apk file with telegram .

know my question is :

  • how can i get the apk file from android phone .
  • and how can i send this apk with telegram .

Thanks !

Swipe to Dismiss for RecyclerView

I used to SwipeToDismiss library but now I'm trying to migrate to RecyclerView and things are not so obvious, do you know any replacements for this lib? Any ideas how to implement it from the scratch?

samedi 6 août 2016

Need to find POI near to a Geoline

  • e.g. I would expect, that we have a line defined with multiple geo coordinates and the POI are nearby the line.

Is there any way that Elasticsearch provides for this as like we have distance query, bounding box query.

org.postgresql.util.PGobject to org.postgis.Point;

Do you know how can convert the type of PGobject to Point in Java? Actually PGobject is an object like this: PGobject geolocation:

type: geography
value: 0101000020E6100000C006335CD3043840504BBDB89EC14140

How can convert this number into Point?

Do I need to low pass filter Sensor.TYPE_ROTATION_VECTOR?

As stated in this Readme it is recommended to low pass filter the Android sensors. Is this also recommended for the TYPE_ROTATION_VECTOR sensor, which is a software sensor?

Java connection to smart cards

I have a question and really need help over here.How can NetBeans connect to Mifare card reader? is there any jar file to do this? I have some jar files used by other programmers, but no clear documentation to understand what is happening...

Large TextView in Android

My TextView contain three lines, I would like to change each line of the single textView's margin right and left with different dp.How to do it?

android:layout_marginRight="20dp"
android:layout_marginEnd="20dp"

moves the entire TextView.

getParentFragment returning null

I have a Fragment that has a FrameLayout. This first fragment (A) loads inside its Framelayout another fragment (B). When I call getParentFragment from inner fragment (B), I get null. How should this method be used properly?

Can anyone correct my program? [on hold]

Why does it say true? Its filledredcircle is already removed! https://www.dropbox.com/sh/3mt5ps9knnkkwlp/AAAWWEMVeywJImQ3Sdbgtlj8a?dl=0

Thanks for help Christina

Why doesn't lexer get autogenerated?

I have used JFlex with netbeans before with no problem. But now I am trying to use it with Intelij IDEA and when I try to build my project, lexer does not get autogenerated! Is there something I need to do before building my project?

Choose google account each time google sign-in api

I try to implement the Google sign-in API. It works pretty well, but I would like to let the user choose the account to sign in with each time. For now, when I select an account, it's always this account which is chosen.

Thanks

How to enter more data than a screen to an Activity

I am a beginner at Android Studio and, for example, I want to make 30 buttons on a vertical Linear Layout or I have a very long text. How can I display it all in one screen? I mean how can I make it scrollable ?

can`t webview load html page from assets folder

in my app not load html page from assets folder and not error are occur and screen are display as blank

webView = (WebView) findViewById(R.id.htmlviewer);
            webView.getSettings().setJavaScriptEnabled(true);
            webView.loadUrl("file:///android_asset/index.html");
            setContentView(R.layout.htmldesplay); 

Android How to save media player mp3 url when buffer completed

i have media player class.

Is possible to save mp3 track when buffer Player completed?

 private OnBufferingUpdateListener seekBarBufferingUpdateListener = new OnBufferingUpdateListener() {

    @Override
    public void onBufferingUpdate(MediaPlayer mp, int percent) {

        if (percent == 100)
             mp.getCompleteBufferMp3And SaveToSdCard(); // <--
    }
};

Android Recycler view Swipe to Delete like iPhone possible?

Is it possible to do this in Android?

I have a recycler view. When user swipes the item, it should swipe only to 50% of screen width and show a delete icon at the extreme right. Upon deleting the icon, the item should be deleted.

Not all folder commit for android studio project

Not all folder in project uploaded to github as default. Is it ok?

such folder build not uploading to git as default. any reference about it? should I leave it or including folder build too?

How to do that?

Thank you

Spinner Android link to XML items file

I want to create a spinner in my first app, but I don't know how to link it to the item list XML file. Please help me!

UPDATE

My code :

<Spinner
android:width="wrap-content"
android:height="wrap-content" />

What are EJB callbacks and why do we need them?

I'm just started to look at Java EE but I'm struggling to understand what callbacks are exactly and what they are used for.

Does anyone have a clear explanation of what they are? I've looked around the site but been unable to find much information.

Check if String contains unicode character Android

I have TextView which always displays first letter from String. So the code looks like that:

textView.setText(string.substring(0,1));  

But unfortunately it's not displaying unicode sign if the first sign in String is unicode sign. How can I fix that?

XAMPP or Online Webhost for my Android/IOS app

I want to know which one to use, will using XAMPP on my computer slow it down if there are too many users on the app, and If i make the app with ios and android can i put the user information in the same database? Thanks!

Displaying a message in iOS which has the same functionality as Toast in Android

I need to know if there is any method in iOS which behaves like Toast messages in Android. That is, I need to display a message which is dismissed automatically after few seconds. This is similar to the functionality of the Toast class in the Android environment.

How to get numeric keypad arrows working with java applications on Linux

The arrow keys on the numeric keypad do not work with Java applications on Linux. Strangely enough, the Home, End, PgUp, PgDn, Ins, Del all work.

This is especially annoying when using Intellij for programming.

How do you get the arrow keys working?

Compile OpenCV in a Java Program | Multiplatform (Mac,Linux,Win)

I want to know how I can compile the OpenCV library within my Java program. In this program the library is not needed. I need this because I don't want my customers to compile the OpenCV library manually. I did it on my Mac manually with cmake.

Populating RecyclerView with sqlite

Can someone tell me a tutorial where I can populate a RecyclerView with sqlite data, in a very simple way, where I can add, view, edit & delete data. I am new to Android, I am not able to find good tutorials. Replies would be very helpful.

Please explain this line used in android programming "buttonsel.setOnClickListener(new View.OnClickListener())" [on hold]

I am totally new to android programming and sometimes while watching online tutorials they use this line buttonsel.setOnClickListener(new View.OnClickListener()); to perform action on click and they do not explain how it works and what is the meaning of setOnClickListener(), so please explain me.

What are the things hiding in abstraction?

Most of the people says that abstraction is hiding something and showing only functionality to the user. Can anyone explain me what are all the things you are hiding and what are all the things you are showing?? please don't explain with the examples of animal, engine, vehicle.

vendredi 5 août 2016

Enable bluetooth tethering android programmatically

I am trying to make an application like "Bluetooth auto tethering" on play store. I read on the forum that Android is very security-aware and will not enable this setting without user interaction.

I need some explanations about how enable bluetooth tethering.

Thank you

How to know color in Google Maps Android API?

How can I know what exact color of this point is?

enter image description here

Where can I find it?

How do I convert special characters using java?

I have strings like:

Avery® Laser &amp; Inkjet Self-Adhesive

I need to convert them to

Avery Laser & Inkjet Self-Adhesive.

I.e. remove special characters and convert html special chars to regular ones.

I want to load properties from MySQL database on SpringBoot startup?

My table 'props' has 2 columns- "prop_name" and "prop_value". Also, I need to store this in a properties file and later get it anytime using getters. All by using annotations.

My Property table

How do I create a batch of files using an array to set value of variable before creating file?

How do I iterate through an array to set the value of a variable to the item in the list and save a file with the name of that particular value. My final product should be a bunch of files that only differ by the value of the variable.

when I download Google Play Services, I can't find the library in ECLIPS

enter image description here

when I download Google Play Services from SDK, I can't find the library. I downloaded another library from the internet but my project couldn't compile.

i used eclipse

Is creating a method considered an abstraction?

Let's say I have this method

void print(String msg){
 System.out.println(msg);
}

Since I created a method that prints, I don't have to know how it prints it, so is this considered an abstraction, or am I getting it all wrong?

how onAttach() gets to know which activity is calling it (android studio)

@Override public void onAttach(Activity activity) { super.onAttach(activity); try{ activityCommander = (TopSectionListener) activity; }catch (ClassCastException e){ throw new ClassCastException(activity.toString()); } }

i want to know how an activity calls onAttach of fragment , so that fragment comes to know by which activity it is called or attached to ?

Is there any possible way to programatically rate an android app without entering google play

Is there any possible way to rate an android app without entering the play store?? I am thinking of creating a java application that can give a rating instantly for a particular app,so that the user only need to input the google account details in the java application.

it's possible send a streaming video from Youtube using cordova?

I want show a live video streaming from youtube using cordova, but I no sure if it's possible or not. I readed about youtube.liveBroadcasts.bind bind from Youtube API, but I'm not sure if it's possible using cordova. exist a way to take this streaming with cordova?

AndroidManfest missing from new Android project in Eclipse

Created one Android application project in eclipse and whenever I tried to run that application its throwing an error message saying AndroidManifest.xml file is missing.

What is the reason for this?

How do I add AndroidManifest.xml to my Android project.?

how to show an activity over another on half of the screen in the right position?

I am new in android. I have 2 activities and I want to show the second activity over the first one, but the second activity has a layout:width : 250dp and layout height is fill-parent(fill the screen) and start from the right of the screen. How can I do that?

Calculation with JSON [on hold]

I want to write simple program to calculate balance amount from the JSON object.

Below is my JSON object

[
  {name:"12345",dramt:30000, cramt:70000},
  {name:"abcd123",dramt:20000, cramt:75000},
  {name:"abcd123",dramt:40000, cramt:100000},
]

Formula to calculate balance = cramt - dramt

Thanks a lot

android wishlist implementation for the ecommerce app [on hold]

I am trying to build the ecommerce app,i facing the problem to implement the wishlist option in my app.Please anybody suggest me,how can i do it?? [![Here is the wishlist image][1]][1]

Any ideas or any pseudo code will be very help helpful to me. Thanks

convert JSP EL variable to java variable

I want to convert a jsp EL variable ${MyVar} to java String variable <% String MyJVar = ${MyVar}; %>.

This is it possible in jsp page without use java servlet?

think you fore future help

Do I HAVE to declare every activity in a manifest file?

I want to create an Activity but not have to declare it in the manifest file. Is this possible? Everywhere I've seen it seems that every activity must be declared in the manifest, yet I notice that some activities, such as the built-in ChooserActivity, is not declared in my manifest file.

What is the mechanism of synchronized [duplicate]

This question already has an answer here:

I want to know the mechanism of java's keyword--synchronized. is it like to the operating system's monitors or mutex ?

Is it a bad practice to check null before returning from a getter?

I wanna prevent getters from returning null values, like the examples bellow. Is this a bad practice?

Example 1

public Integer getMinutes() {
   if (minutes == null)
       minutes = 0;
   return minutes;
}

Example 2

public List getTasks() {
   if (tasks == null)
       tasks = new ArrayList();
   return tasks;
}

Android line graph

click to display image

Is it possible draw a line graph with/with out using third party library in android(As like above picture) If we use with library, do we need to take any licence?

Acess Realm object from services for execiting transaction

I have a background service in my Android app which should notify user 1 day before a specific date attribute in my database in app.I know how to execute transaction and notify user but I am not able to access the realm object from service. Can anyone help thanks in advance

Difference between the @Singleton in module and @Singleton in component in Dagger 2

Im learning Dagger 2, i have noticed that in some examples there is a @Singleton in the module's methods and on other @Singleton on the Component's methods? What is the difference and what exactly a @Singleton annotation on a module's method and on an component's method mean?

command: calabash-android setup. How to send static parameters “path”, “password”, “alias”?

calabash-android setup, when i use this command in linux console, i want to send static parameters "path", "password", "alias" It need for my bash script, my script generates keystore file and use settings in command "calabash-android setup

How to send static parameters "path", "password", "alias"? calabash-android setup "path" "password" "alias"

how to use timer with SwingWorker

need an example, how to use timer in SwingWorker ? because it impossible to add an ActionListener to my Timer like that !

private Timer timer = new Timer(100, new ActionListener() {

    @Override
    public void actionPerformed(ActionEvent ae) {

    }
});

Message Error : The constructor Timer(int, new ActionListener(){}) is undefined

Difference between using an online webhost and Xampp or Wamp?

I am asking because I am making an app for both android and apple, would using a XAMPP or WAMP slow down my computer if there are too many people using the app, and would it be possible to connect the IOS and Android users to the same server/database? Thank You.

jeudi 4 août 2016

Feedback on sliding through keys in android keyboard

I am using lift-to-type custom keyboard for android. I added vibration feedback in the 'onPress' method. But it gives the feedback only for the first key pressed, and not when I scroll/slide through the neighbouring keys without lifting the finger. How should I get the feedback for the subsequent keys pressed?

Junit, testing timer.schedule without relying on thread sleeping or time

I have implemented a method that executes some logic, after a certain amount of time, using a TimerTask and Timer.schedule. I want to verify this behaviour using Junit, however, I would like to know if there are better ways to test it, without using thread sleeping, or measuring time.

Thanks.

Draw a special hollow square shape in android

This is my first question, hope find the correct answer with help you guys :) I want to draw the entire white shape(whith that little circle)in android, can any body help me please?

square shape is here

How to get start with Unit tests?

I want to get start with unit tests, there are different frameworks, libraries, but I don't know which ones are the latest, the most useful and important. I have never done unit tests please provide me some useful tutorials, which could help me know unit testing and based on it learn TDD, BDD.

Android App crashes when installed from website/Google Drive

I made an app recently for a friend and I tested it out on my phone connected to Android Studio and it worked perfectly. But when I uploaded it to my Google Drive for them to download it, it crashed whenever a button was pressed. (Unfortunately [App name} has stopped). Someone help, thanks.

Android Fragment handle back button press

I have some fragments in my activity

[1], [2], [3], [4], [5], [6]

And on Back Button Press I must to return from [2] to [1] if current active fragment is [2], or do nothing otherwise.

What is the best practise to do that?

EDIT: Application must not return to [2] from [3]...[6]

Set the checkbox of a CheckboxTreeViewer when the row is clicked

I'm looking for a generic approach to check the checkbox of CheckBoxTreeViewer, when the row / the item is selected. I've found a similar question regarding the CheckBoxTableViewer, which answer helped me, but it doesn't apply to the CheckBoxTreeViewer. I assume, I have to use the ISelectionChangedListener.

in Android studio application cannot find the path specified error

I try to open a game in Android studio then this error appears to me

Error:Cannot run program "C:Program FilesJavajdk1.7.0_25binjava" (in directory "C:Userslenovo.AndroidStudio2.0systemcompile-server"): CreateProcess error=2, The system cannot find the file specified

So what I should do?

Why are exponents required for hex real numbers in Java

In java for example this is a hex number 0x10

0x10.2P2 this is a correct hexadecimal double.

But why 0x1f.2 is not correct. Why we cannot use that while 0x1f.2P1 should give the same result but it works.

Playstore Server

So like, I want the highscores to be saved online but I am guessing that I'll need a server for that. If I did upload a game on Play store, will they provide us servers to save scores online for the other users to see others' highscore? Maybe I still have to do something else?

Is Overloading possible in Child Class?

In the below code-snipet, what is type of method "meth" from class B? is it Overloading, Overriding, method hiding, or independant method?

class A{
    public void meth(){
        //some implementation
    }
}

class B extends A{
    public void meth(int var){
        //some other implementation
    }
}

Android - Do I need to encode data when using the Ion koush library?

I am loading data to server by calling a php file with the Ion lib. I would like to encode the data.

Does Ion automatically encode data or has it any function for that? If not, what is the best opportunity to encode data between android phone and server?

Thank you

angularjs2 with typescript - integrating restful services java

I am having back end rest services developed using java and jersy - I am planning to develop front end using angularjs 2 (typescript).

Somebody please suggest me best way to integrate java back end services , also please suggest me best angularjs 2 architecture to fellow(as I am newbie).

Thanks in advance.

Parsing a date from a string of text

I want to extract the date from the following sentence in java.

"D759,301 Elhalwani June 14, 2016 Hookah Claims CLAIM The ornamental design for a hookah, as shown and described"

Given that there are other sentences with the same structure but different dates, that I also want to extract the date from them.

How to make custom launch of application

I am working on one application,What i am trying to do is first user will register from my app,after successful registration,one confirmation link will get in gmail,now from that mail if user will click on confirmation link,my app should open,Is it possible? can any one help me with that?

facebook SSH key in android app

I have *.jks instead of *.keystore I extracted the SSH key from my certificate.jks but when I try integrate facebook in my app for sharing the sharing dialog flashs out and go not letting me to share ,for your attention I am not using debug key because I released my app to the public .

How to put additional server libs to Tomcat(JBossEWS) on Openshift?

I have a Tomcat/JBossEWS application on Openshift and would need to put some shared jars into lib directory - jbossews/lib. However this directory does not have permission to do this.

I do not use Git and deploy compiled war.

Where can I put shared libraries and how?

Android - The following classes could not be instantiated

I'm a total beginner I just started learning android development and i'm trying to print "Hello World" with the "material light theme" but I have this problem

the following classes could not be instantiated 
 - android.support.design.widget.coordinatorLayout
 - android.support.design.widget.AppBarLayout
 - android.support.design.widget.FloatingActionButton

Navigation view with folders / accounts

I have a navigation view and I need to add a "spinner" to alternate email folders / accounts, such as Gmail. I think that create two groups in menu.xml, folders and accounts, and when you click "spinner" change the visibility of both. Is correct this? And the "spinner" use a image for it?

Thanks

Recreate sqlite database

I'm new to databases and I made a lot of mistakes with currently existing database in my app and I want to know how can I totally delete existing database from my app and create new one starting with database version 1? Do I need to do it programmatically or there is other methods to do it?

Android add arrow image to spinner

I have created a background drawable that I use for a spinner. I would like to now but an arrow image inside this background. I have tried things like android:drawableRight="arrowimage", but this does not seem to show anything. Does anyone know how I can include an image in my custom background for a spinner?

How to detect 'enter' when reading integers using Integer.parseInt

How could I detect the 'enter' and break (if number???) in the code below?

Thanks!

public static void readNumbers(Scanner reader, ArrayList<Integer> list) {

    System.out.println("Give numbers, ‘enter’ will stop.");

    while (true) {
        int number = Integer.parseInt(reader.nextLine());
        if (number ????) {
            break;
        }
        list.add(number);
    } 
 }

Home automation by android

I want to start making my home automated and I was wondering how to controll an electric circuit programatically by android For example making an armature run in the on click listener method of a botton in the app. And I know it's possible because I have seen it. Is there any exact tutorials or guidance?

How to detect outliers in an ArrayList

I'm trying to think of some code that will allow me to search through my ArrayList and detect any values outside the common range of "good values."

Example: 100 105 102 13 104 22 101

How would I be able to write the code to detect that (in this case) 13 and 22 don't fall within the "good values" of around 100?

mercredi 3 août 2016

NumberFormatException Invalid int

enter image description here[if statement][1]

I am getting NumberFormatException even after applying this code whenever I click on button instead of showing the toast message the unfortunately stops

Android Chrome play AOD in background screen off

How to playing AOD in Android Chrome in screen off or using other program

<audio  preload="auto" style="width:100%;" autoplay="autoplay" controls="controls" ">
        <source src="http://mydomain/audio/song.m4a.m3u8"   />

        <p>Your browser does not support HTML5 audio.</p>
    </audio>

i am trying to use Voice input in my android application but when i m clicking on the button it breaks the activity

i am trying to use Voice input in my android application but when i am clicking on the button it show google voice input popup but in result of voice input it breaks the current activity . can some body tell me what will be the problem in my code is there any library which i am missing .

Java processing applet not running

When I try to run my java code for processing it shows an error "selection does not contain applet". This is how I am supposed to run my code.

Here is my code:

package proccesing;
import processing.core.*;

public class proccesing extends PApplet {

    public void setup() {
        background(100,100);
    }

    public void draw() {
        line(0,0,0,100);
    }
}

Is it possible to make an automatic recognize for links?

My application is kind of a social app. My problem is that if someone uploads a text with a link in it, the app doesn't recognize the link and the link isn't clickable.

I thought to myself that maybe there is a simple way to make my app recognize a link and make it clickable.

Java 8 MSI Product Code

Does anyone know where there may be a list off all the Java version 8 Product Codes? Ive looked online and all the lists only go up to java 7.... I am tyring to create a script that uninstalls all previous versions of java but need the product codes to do so. Any help would be much appreciated. Thanks!

Touch listener with android app list

I have list of installed applications,I am trying to make an app where the user put the finger on app then app is Unlock with the finger. How i can use the touch listener.I am a complete novice in touch listener, therefore code or tutorials would be appreciated, as I don't know where to start.

iOS Ruby AWS and Android?

I'm no iOS developer, so sorry if this is a stupid question. I was told a particular app I'm looking to make an Android version for was built in objective-C and uses Ruby and AWS for the backend. So presumably I'd need to plug into AWS for my app, l'm just not sure how Ruby fits in...

change Radiogroup circle colors

I have a radiogroup and trying to change the circle colors. My code is below but running into an issue getting "setButtonTintList" to work.

if (Item.getCar()=='Audi'){

int textColor = Color.parseColor("#000000");

//this is what I'm trying to do but setButtonTextList doesn't even show up as an option
radiogroup.setButtonTextList(ColorStateList.valueOf(textColor));

}

what is the difference between compile, testCompile and provided in gradle dependency

I am using android studio and in project structure -> dependencies tab following options i can see:

  1. Compile
  2. Provided
  3. APK
  4. Test Compile
  5. Debug Compile
  6. Release Compile

my question: what is the difference between compile, testCompile and provided in gradle dependency

how to change navigation bar text color in xamarin forms android

my xamarin forms using cross platform application android version bartextcolor property does not work ! . barbackroundcolor property was changed.but bartextcolor does not chanaged i am using the code is

MainPage = new NavigationPage {BarBackgroundColor=Color.Lime, BarTextColor = Color.Purple}; The first property was worked ,second property not worked .pld kindly me answer

What does `collapseContentDescription` of toolbar do?

In Android Toolbar, I found app:collapseContentDescription but don't know what is it and how to use it?

<android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            app:layout_collapseMode="pin"
            app:collapseContentDescription="Collapsed" />

Any explanation? Thanks

How to auto size text dynamically according to the length of the text in android ?

It is given in the material design guidelines. How to go about coding it ? Material Design Guidelines

link to the Guidelines - https://material.google.com/style/typography.html#typography-other-typographic-guidelines

Firebase Cloud Messaging library

I am trying to integrate Firebase Cloud Messaging into an Android app. I have located and added firebase-client-android-2.5.2.jar but this does not include the FirebaseMessaging libraries. I have searched high and low and have seen countless instructions on using this service but I have not located a jar file or class files for any of this.

Android app json data parson on multiple activities

HI all im having a app which have a log in form and after log in user can view his data on multiple activities and data is on online mssql server. I made log in work and now want to show data on my all activities using json parsing please provide me some help thank you in advance

Remove or update exif thumbnail from image

Is there anyway to remove an exif thumbnail from an image?

I'm cropping images in my app and copy all exif data lossless with the sanselan library. Afterwards, I update widht/height/rotation accordingly.

I could not find anyway to update the exif thumbnail or to remove it, any ideas how to do that?

Cancel onKey Event from onKey method

Is it possible to cancel an event from within the onKey method. I only want to allow numbers 0 through 9. If another key was pressed then I want to cancel the key press

public boolean onKey(View v, int keyCode, KeyEvent ev) {
            // TODO Auto-generated method stub

            if(keyCode <30 || keyCode > 39){
               //Cancel Event
            }
            return false;
        }

Why multiple instances of Method object are for the inherited methods

I discovered that classes with default equals method has different instances of meta object Method. Why is it so? At first glance it looks not optimal because method objects are immutable.

class X {}
Method defaultM = Object.class.getMethod("equals", Object.class)
Method xMethod =  X.class.getMethod("equals", Object.class)

xMethod != defaultM
xMethod.equals(defaultM)

Audio Voice Changer using Matlab

I am currently working on Audio Voice Changer in Matlab for DSP Semester project. So far I have been able to read wav files using wavread in Matlab. However its not sufficient that i read only wav files.I want to read all audio files So to read all audio files please tell me the command to read.

Gson - parsing json with field that is array or string

I'm trying to parse some json with Gson and I have following problem:

This is fragment of my json:

...
{
  "label": "Check Digit",
  "value": "W"
},
{
  "label": "Equipment",
  "value": [
    "With Standard Liftgate",
    "(-) Version Packages"
  ]
}
...

How to make Gson to parse it and use value as Array of String always?

Is it possible to assign a html form the value of a java String?

Is it possible to do something like this:

<form action="foo" method="get">
   <input type="hidden" name="ID" value="<% classInstance.getID(); %>">
</form>

? Each time I try, the receiving Servlet does not display the Id of the classInstance.
How can I make this work?

RealM: How to remove RealmList but check references

I have RealmList in the RealmObject and some other RealmObjects. I want to clear list and remove objects from RealM BUT if some other object has reference on this object(that is in the RealmList) I want just clear references and keep it in RealM.

I didn't find method for such deleting, is there any easy way?

How to make a operating system with java?

how do I start or learn how to make an object-oriented operating system with java?? which sources can I use and is it even worth doing it in java what language do I use if it's not good?

I'm a new programmer I'm sorry if I'm dumb I just need advice

thanks for your time...

Html.fromHtml() is depricated, what is the alternative?

I updated to the SDK Version 24 and now Html.fromHtml() is depricted. And the Html class has a a new method with extra parameter named flag, but it's minimum API is 24.

Is there any alternative to this function to the lower API versions?. I don't want to use a WebView for this purpose.

mardi 2 août 2016

Cross Platform ORM for mobile solutions

Is there any cross platform orm solution for mobile platforms namely Android, iOS and Windows Mobile.

If not, has anybody any experience in migrating data from ormlite in Android to other platforms like iOS and Windows Mobile. I would like to know the best approach for migrating data that we have in ormlite to the aforementioned platforms.

Google api gettoken(Context,String,String) is now deprecated

I used to use the GoogleAuthUtil.gettoken(Context,String,String) method to obtain the access token. Now that it's deprecated, I'd like an alternative to obtain an IP address. I figured that it now takes Account as a parameter type, but I really don't know how that works. Any help will be appreciated. Thank you.

How to process credit card payments or any other such service in Java or angularjs/javascript?

I was working on an online shopping cart project and I am finally on the billing page. I am not sure how I should proceed with that. I am using JSP/Servlet for backend and angularjs and javascript for the front end. How do these transactions actually go through?And how can I include it in my form>

Android Dialog background dim color

When Android AlertDialog shows, the background around this dialog becomes darker. This is probably achieved by first filling the whole screen with a half-transparent color and then putting a dialog on top of that.

My question is: what is the default color of that background fill?

#88666666 //looks close, but not enough

Where the connection paramater of "Mivos X"?

I can run and deploy the mifos x,

The default connection parameter is username : root port : 3306 password : mysql

But I can't change the paramater connection,

Where i can change this parameter ?

you can clonne the project at https://github.com/FazuanGenwind/mifosx

How to revert back from currency format, Android?

I'm developing Android app which uses this method:

public static String currencyFormat(BigDecimal n) {
    return NumberFormat.getCurrencyInstance().format(n);
}

which formats number based on Locale currency.

How to revert back from currency format, e.g. $35, to 35? Note that I cannot just remove First character because different locales have different currency name lengths.

How to convert int[] into List<Integer> in Java?

How do I convert int[] into List<Integer> in Java?

Of course, I'm interested in any other answer than doing it in a loop, item by item. But if there's no other answer, I'll pick that one as the best to show the fact that this functionality is not part of Java.

How to center text in Alert Dialog Builder?

I'm trying to center some text in a default Alert Dialog Builder Here's my code so far, but it defaults to the left.

            new AlertDialog.Builder(getActivity())
                    .setTitle("Well done!")
                    .setMessage("Message centered????")

                    .setPositiveButton("OK",
                            new DialogInterface.OnClickListener() {

                                @Override
                                public void onClick(DialogInterface dialog,
                                        int which) {
                                    // TODO Auto-generated method stub

                                }
                            })

                    .setIcon(R.drawable.img_ok)
                    .show();

        }

Java : finding the total number of divisors for a very large number in an efficient way

the number is n = 2747502308387844992 count = 0 Normal ways like using for loop is not working.

for(i=1;i<n;i++)
{
    if(n%i == 0 ){count++;}
}
System.out.println(count%(Math.pow(10,9)+7));

output to be printed is 10240. suggest me the other way which is effiecient. Please try the solution in IDE before putting here.

Can i create a pen pressure sensitivity? (In any program available)

I want to create a pen pressure data in window. Can i create a pen pressure sensitivity?

As for adjusting the pressure using the speed.(In photoshop, sai-tool, etc)

I am not good at English. sorry :(

(Is there any way to using Java? jTablet is only just sense , it can't be create a pressure.)

Make music player in Android

I want to make a simple music player but I tried using MediaPlayer class but faced problem when I resume the app as I loose my control from it and song is still playing. I don't know what is the correct way. I think handler should be used but couldn't get good tutorial. Please suggest me a tutorial or else.

Where to check for Android Permissions?

We are moving our app to SDK 23 and realize that we need to explicitly handle permissions in the code.

Instead of going through the entire code base, is there a best practice (or an IDE shortcut) that would help us determine all the places where we may need to use 'ContextCompat.checkSelfPermission' for each permission in the app?

Image recognition application

I'm planning to build an image recognition app that recognize object and text for android mobile platform. I tried to find some API's but it is too costly for me to add these API in my app. Where should I find some search engines cheaper than IQEngines, kooba etc or is there any tool that I can use for my app?

Android Api 24 can't find sources

I have this grade file:

//ext.support_library_version = '24.0.0'

    android {
        compileSdkVersion 24
        buildToolsVersion '24.0.0'

        defaultConfig {
            applicationId "---"
            minSdkVersion 21
            targetSdkVersion 24
            versionCode 1
            versionName "1.0"
        }
    ...
    }

But then when i try to open any android related class, it says i haven't got sources for api24, even tho the buildToolsVersion '24.0.0' is installed. Any idea why?

Is the Object stored in each position of the array in Arrays.fill(Object[], Object) the same object?

I am doing something where I have code like this

Object[] array = new Object[10];
Arrays.fill(array, new Object());

my question is, will array[0] == array[1] be true, or just array[0].equals(array[1])? Or in other words, are all of the values in the array the same exact object or equivalent objects?

Select a node that has a specific attribute value in firebase

I have a database from which i want to select a specific node. For example in my case i want to select the nodes that username is "fatma". So how can i do that in android ? my database structure

Rendering Problems Exception android.graphics.drawable

I'm getting : Rendering Problems Exception raised during rendering: android.graphics.drawable.VectorDrawable_Delegate.nDraw(JJJLandroid/graphics/Rect;ZZ)

I know that I can change from " N previe" version to "23" and it will work but what I have to do so that it works on "preview"?

I tryed: -clearing and rebuilding -installed sdk tools - invalidate caches /restart

Static method in inheritance

class A
{
    static{
        get();
    }
    static void get(){
        System.out.println("HELLO");
    }
}

class B extends A
{
    public static void main(String[] args) {

    }
}

Output:

HELLO

How is static method of class A getting called. I can understand static method of B getting called but not of A.

Sending Data to a Google Spreadsheet from and Android App

I'm making an app where I want to store data the users input on a google spreadsheet. I have tried Secure HTTP Post in Android already and the first answer does not work when I put it in android studio. Does anyone know another way to send data from an app to the spreadsheet?

How do I login into www.messenger.com using Java and HtmlUnit

I am trying to login into www.messenger.com with htmlunit in Java; I want to get the html page after I log in. So far, I have looked around stackoverflow but every piece of code I find, I get this error:

WARNING: Obsolete content type encountered: 'application/x-javascript'.

What does this mean? How do I fix it?

ExoPlayer: How to play http live stream?

i want to use ExoPlayer library for my Android application to play live streaming videos.

I was looking through the exoplayer website and documentation as well as Github page but i wasn't satisfied with the explanations.

Anyone can give me a hint how do you play a http live streaming video through ExoPlayer?

Thanks in advance.

How to reduce the memory used by the android emulator?

Is there a way to reduce memory used by android emulator? When I turn on Resource Monitor, It commits over 800MB(I guess this is the reason for all my computer's lags)!

My info:

OS: Window 7, 2GB RAM, CPU core i3.

Emulator: Device RAM size: 512MB, data partition size: 384MB, Skin: HVGA 480x320, SD Card: 4GiB.

Java reading files from a folder added in runtime during the same session

I want to write a program in java where it reads and parses text files from a folder. In this I want the program to read and parse any new files added to the specific folder during runtime just like how elastic's logstash works. What methods can I use for this?

Number of Tags of NER

As far as I know, Stanford NER has 3,4 and 7 class models (or tags). I need a standard and a Java implementation of a Named Entity Recognizer which has more than 7 tags (for example 13 tags). I don’t want to develop it by myself and I need it to be accurate. Is there any NER which satisfies these conditions?

Thanks

lundi 1 août 2016

Android service that counts user taps on screen even when the application is closed

there are some apps on play store like "tap counter" that can count number of touches on screen, including outside of app and even when the app is closed. The only way i can think of to do it is with accessibilty service but those apps in play store dont seem to use accesibility . So you have an idea? Maybe code ex?

Java - Create Process Error = 193

I am trying to run an external program, which is an executable jar-File (if i double-click), but i am getting the error that the file is not a windows32 application.

try {

String filepath = "C://Users//Name//Desktop//Speedtest.jar";

        Process p = Runtime.getRuntime().exec(filepath);

    } catch (IOException e) {

        e.printStackTrace();
    }

}

Drag and drop web framework

Is there any software or tool where we can just import the web frameworks(like material design lite, materializecss, bootstrap etc) and it renders the playground as a drag and drop web designer. Just like android studio designer. We will just import the library files and the tool will recognize the files and turn it like a drag and drop web designer.

How to get nested map from Cassandra Result Set

I have a Cassandra table like this:

create table Engine (
    primayval text,
    Dataval  map<text,<map<text, double>>,
    PRIMARY KEY (tradeddate)
);

How can I retrieve this in a Java nested map Map<String,Map<String,Double>> using ResultSet-> getMap() without JSON conversion?

Firebase Service Account Credentials Json Read permission denied

I downloaded my service account credential json file from Firebase console placed it earlier in the main directory of GAE endpoint project when I run my backed locally it gives Security exception.

java.security.AccessControlException: access denied ("java.io.FilePermission" "srcmainsecret.json" "read")

I tried placing the .json file under the src directory also but no help.

How are international currencies tested for Android's in-app billing?

Is there currently a way to fully run through international purchase flow through Google's in-app billing? I'm able to test $US purchases, but would like to test in other currencies to verify that everything is working. However, looks like I need a foreign bank account, phone number, and address if I really want to test everything end-to-end, but that is not quite feasible.

Selenium Web Driver - How to check whether all the products in a page loads

I am trying to solve an issue where I need to check whether all the products in a web page loads completely. The products load only when the user scroll the page downwards. Each time on a scroll 8 products are loaded.

How to check in that page that the last product loads and user is now not able to scroll downwards?

Blockchain/Bitcoin software system

I'm searching about blockchain/bitcoin system.

But I can't find really deep tutorial or lessons about blockchain software system.

Which sofware or which network system is the best and how can we build a blockchain system for example with Java/Python or C++ ?

Do you have any advice or tutorial about the tech behind the blockchain system?

Create an application for android fitness band [on hold]

I am new to fitness band.. i want to create an android application for fitness band.I want to calculate heart rate, calories burn and step count etc. Is there any tutorials available to create app for fitness band.

How can i get the data from the fitness band to mobile device? How can i connect my device with fitness band?

What Product Flavor does Android Studio build by default in build.gradle?

We have an Android project that uses the new Gradle build system, and we use Android Studio as a development tool. When there are several product flavors specified in build.gradle, we notice that Android Studio builds the first one specified alphabetically. Is there a way to tell Android Studio to build and test only a specific product flavor during development?

Java Exception java.lang.AbstractMethodError

How can I solve this exception:

Exception in thread "main" java.lang.AbstractMethodError: com.mysql.jdbc.Connection.isValid(I)Z
    at org.apache.commons.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:914)
...

I read that this error is something about libraries/ jdk but I can't find a good way to solve it. I need some help from you. Thank you!

setting the little app icon in a notification

I'm trying to build my notification and I can't find the option to show the little rounded app logo below the round app icon like in this image

enter image description here

How do I do it?

Gradle build jar of jars

I have project A and B, both built in jenkins and pushed to artifactory.

Project C has dependencies on A and B and I can download each project's dependencies, but Gradle complains that the libraries stored in those JARs were not imported at compile time. Does anyone have an idea how to instruct Gradle to compile the libraries within the JARs?

How to replace the activity's fragment from the fragment itself?

My application has a Fragment inside its Activity. I would like to programmatically replace the fragment by another one from the current fragment itself.

For example, if I click on a button inside the fragment, the fragment should be replaced with another one, but the activity should remain the same.

Is it possible? If so, how to do it?

How to use Facebook sdk to share posts from my android app with my app name like "via my app name"?

I am using facebook sdk in android app to share some posts in facebook wall and it successfully post my items on facebook. But it does not display my app name like "via my app name" etc . It just posted the item. I need to know some way to display that this Item is posted through my android app. Can anyone please help me

No reverse method in String class in Java?

Why there is no reverse method in String class in Java? Instead, the reverse() method is provided in StringBuilder? Is there a reason for this? But String has split(), regionMatches(), etc., which are more complex than the reverse() method.

When they added these methods, why not add reverse()?

Why user input in Java "+" Does Not Equel "+" [duplicate]

This question already has an answer here:

Scanner keyboard = new Scanner(System.in);
String input = keyboard.next();
System.out.println(input == "+");

How come the print statement prints false if the user enters "+"?

APK source code has no gradle files

New to android studio and Java development. I'm exploring some APK source code I found online and it does not have any gradle build files. I am using Android studio and wondering how to generate these files. The two options I am seeing seem to be (1) Create myself from scratch, (2) Export the project from Eclipse building these files in the export process. Any thoughts?

How does assigning primitives to Object works? [duplicate]

This question already has an answer here:

Lets say I got those two lines:

Object obj;
obj = false;

Will obj casted into a Boolean (the wrapped class of boolean)?

Android grid layout with different cell sizes

I've been doing so research but I cannot find a way to do a grid layout with different cell sizes.

Below there is an image of what I am trying to do highlighted in yellow.

grid that I am trying to build

Thanks in advanced.

How would I calculate the degree measure of a number like tan(45) in Java?

In case the title was confusing, here is what I mean. When I use the code Math.tan(45); to return a number, I can't use Math.atan(Math.tan(45)); to return 45. I can't just make it simply return 45, because I want it to be dynamic.

How would I return the degree measure of a tangent, sine, or cosine?

AWS cognito: In mobile app how to set token expiry to infinite

Im using cognito developer authentication provider as my access control for my mobile app. Problem is in mobile apps, once the user logs in he/she doesnt have to login again. But with AWS cognito the token only lasts some 1 hour or so. How can I make sure the token expiry is set to infinite maybe 1 year or so. Please advice

thanks, Rajan

Is there a way to get the source code from an APK file?

The hard drive on my laptop just crashed and I lost all the source code for an app that I have been working on for the past two months. All I have is the APK file that is stored in my email from when I sent it to a friend.

Is there any way to extract my source code from this APK file?