WISHY

1

votes
1

answer
352

views

File upload using retrofit android?

I am trying to upload a video file using multipart by retrofit and I get the following error in response Response{protocol=http/1.1, code=405, message=Method Not Allowed, url=serverurl/Upload/Videos/} This is my code for file upload void uploadVideo(String videoPath) { dialog.show(); File videoFile...
WISHY
0

votes
1

answer
10

views

Upload binary file with retrofit android?

I have image file to be uploaded to server. The API is to be of Content-Type:application/x-www-form-urlencoded. Below is my interface method @Headers('Content-Type: application/octet-stream') @PUT Call putUserProfileImage(@Url String url, @Body RequestBody file); This is my method call RequestBody r...
WISHY
1

votes
2

answer
1.1k

views

How do I keep a user permanently online with Smack on Android?

Okay here is my problem where i am stuck for so many days. I am developing a simple chat application with the help of XMPP client - SMACK. Everything works fine for me normal chat process from one friend to another, also added the notification part. What i am not able to do is if i forcibly close my...
Wishy
1

votes
1

answer
54

views

Does bitmap of an image remains constant throughout the lifecycle of the android application?

Okay so this might be a very silly question to ask. Does a bitmap of an image remains constant traversing through different activities in the android. Well my issue is : I have an activity with image view having a default image. I am previewing another image picked from the gallery if the user wants...
Wishy
1

votes
1

answer
1.1k

views

How to design layout programmatically, android?

I need to design the above layout through java coding. B1 & B2-> Horizontal linear layout B3 & B4-> Horizontal linear layout B5 & B6-> Horizontal linear layout B7 & B8-> Horizontal linear layout B9,B10 & B11-> Horizontal linear layout Parent layout is Linearlayout. This is how I am proceeding @Over...
WISHY
1

votes
1

answer
75

views

How can I achieve this design in android?

I need to achieve the following design for these buttons I have all the images. The left round images with pressed state and normal The button text background images but they are a rectangle shape. I am using a linear layout and table layout This is my XML code This is the output I get How do I cu...
WISHY
1

votes
3

answer
214

views

Parse XML in android?

I have the below XML, I need to parse it and get the text in 'Message' and 'Id'. I tried using the pull parser but I only get start tag i.e 'Notice Board' Here is the code I tried public void parseXML(XmlPullParser myParser) { try { int event = myParser.getEventType(); while (event != XmlPullParse...
WISHY
1

votes
3

answer
702

views

Add next line to string to be displayed in text view, android?

I have string value which comes from server in XML format. For eg
WISHY
1

votes
1

answer
926

views

Determine android CPU speed?

One of my friend is into mobile game development. Well the issue he faces is like this.. In his game some rooted phone users are able to score very high which is quite impossible unless the the CPU or system clock speed of the android device been slow and that is the case. Those users use some thir...
WISHY
1

votes
1

answer
127

views

Converting json string to JSONArray in java?

I have this json string returned from a 3rd party api {'msg':'xff','uuid':'44037b67-3629-4325-83e5-7a00cb78dfdf'} When I try to parse it by the below code JSONArray json = new JSONArray(message.toString()); JSONArray arr = json.getJSONArray(0); String mess = arr.getJSONObject(0).getString('msg');...
WISHY
1

votes
3

answer
2.4k

views

AppCompat does not support the current theme features, android?

I am using AppCompatActivity public class SplashActivity extends AppCompatActivity This is my theme true false It is throwing the exception java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vfi/com.vfi.SplashActivity}: java.lang.IllegalArgumentException: AppCompat does not supp...
WISHY
1

votes
1

answer
429

views

Google hangout / telephone / voip input to web app

I am currently building a web application and was exploring if there is a way to parse an incoming voip call information. For e.g.: I have a list of contacts with phone numbers on my page. when I receive a call on my hangout in that browser, I need to parse the caller's phone number and search for...
wishy
1

votes
2

answer
315

views

Building jhipster in Windows Jenkins

When I try to build JHipster on a windows Jenkins instance, I get the following error org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.4:build (run-frontend-build) on project jhipster: Error during : cmd /c bower --version I tri...
wishy
1

votes
1

answer
271

views

Dagger 2 method injection?

I have 2 classes for which I want dependency injection to happen. Basically both need each other's objects to perform some task. First class public class AppMobilePresenter { AppPresenter appPresenter; @Inject public AppMobilePresenter(AppPresenter appPresenter) { this.appPresenter = appCMSPresente...
WISHY
1

votes
6

answer
4.8k

views

Why i am getting nullpointer exception at this.getWritableDatabase();, android?

Exception occurs at SQLiteDatabase db = this.getWritableDatabase(); Providing with my databasehandler class public class DatabaseHandler extends SQLiteOpenHelper { // All Static variables // Database Version private static final int DATABASE_VERSION = 1; // Database Name private static final Strin...
Wishy
1

votes
1

answer
5.1k

views

Use service to get GPS location, android?

This is first time I am using service and it sure looks a lot complicated from activity. So I am trying to get the user's location after he has closed my application with the service. This is my service class. public class LocTrack extends Service { GPSTracker gp; @Override public void onCreate() {...
WISHY
1

votes
2

answer
4.2k

views

Track other devices with GPS, android? [closed]

I am working on an application which will be installed on around 50 devices. I will be getting the location of all those 50 users in every 5 minutes. I have a small concept tell me if it's possible or not. And if possible how do i implement that? So it goes like this we have the location co-ordinate...
WISHY
1

votes
1

answer
2.8k

views

How to know if the user has pressed power key twice or thrice continuously outside the activity in android?

I need to know when the user will press the power key continuously 2 or 3 times. But in the case the user is out of the application lets say on the home screen or even using any other application. I getting the listener event of the power key on the activity but not on the service. @Override public...
WISHY
1

votes
4

answer
350

views

Splitting a string over multiple lines?

Let us suppose we have the following string: String s1 = 'This is a very long string which needs to be broken' If the string's length is more than 30 characters, the string needs to be broken down so that each line should not contain more than 30 characters. After splitting the output should be: 'Th...
WISHY
1

votes
1

answer
882

views

Permission denial : broadcasting intent android?

I am getting this following error Permission Denial: broadcasting Intent { act=com.android.vending.INSTALL_REFERRER flg=0x10 cmp=com.app/.MyBroadcastReceiver (has extras) } from null (pid=1853, uid=2000) requires com.google.android.c2dm.permission.SEND due to receiver com.app/.MyBroadcastReceiver In...
WISHY
1

votes
3

answer
155

views

Fragment back stack, android?

My activity consists of navigation drawer and currently have 5 options in the left menu. Which all opens in fragment. I am looking for a way to keep a stack of all the fragments so when the user presses back button he moves to previous fragment. Like- Activity consists of drawer menu which have 5 o...
WISHY
1

votes
4

answer
42

views

Align view to left and right position of another view, constraint layout?

I need to create the view as the below image with the help of constraint layout This is my xml code: As per the above code, the views are overlapping with each other. I want one view to the left of textview and others to be on right.
WISHY
1

votes
3

answer
1.1k

views

Tablayout text color not changes, android?

I am using the tablayout in fragment. This is my main fragment for tabs public class TabFragment extends Fragment { private TabLayout tabLayout; private ViewPager viewPager; public TabFragment () { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, Vie...
WISHY
1

votes
2

answer
1.2k

views

Open multiple views in multiple browser tabs in Angularjs

I have an angular page with header, sidebar and a view with different routes (Parent page). There is a requirement to open multiple tabs with the same header and sidebar but different view (Child page). Also, the changes in the child view (second tab) need to be propagated to the parent tab. window....
wishy
1

votes
1

answer
197

views

NoClassDefFoundError FirebaseOptions, android?

I am getting this exception when I run my app on the device. java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions at com.google.firebase.FirebaseApp.zzeh(Unknown Source) at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source) at android.content.ContentProvider.at...
WISHY
1

votes
5

answer
5.8k

views

SubString a URL from the end? [closed]

'http://www.freegreatpicture.com/files/146/26189-abstract-color-background.jpg' I want to substring this url so i get the image name '26189-abstract-color-background.jpg' How to do it?
Wishy
1

votes
3

answer
6.1k

views

Upload large files to server in android?

I am using the following example to upload video to server. UPLOAD AUDIO VIDEO IMAGE However I am not able to upload large size video files say more than 2 MB. Any other example would help me if possible? Or is there need to be any change in the above code?
WISHY
1

votes
5

answer
3.4k

views

Supporting all screen sizes in android?

I know this questions has been asked quite a few times. But I couldn't find the bebest possible solution to my query. I have followed every step given in the developer support of android. Support Multiple Screen Putting images in different folders for different sizes. Making different layout folders...
WISHY
1

votes
3

answer
1.2k

views

Update multiple rows based on id in sqlite on android?

I have db table as follows I want to update status column to 1 with id = 1,2,3. For a single row I can update with content values public void updateJobStatus(int callId) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues data = new ContentValues(); data.put(AppDBConstants.KEY_JOB_DETAI...
WISHY
16

votes
3

answer
47.1k

views

How pinch zoom image in image zoom android? [closed]

I have to display image in an imageview. And what I want to do is just simply pinch and zoom functionality on imageview.
Wishy
2

votes
1

answer
8.4k

views

Unable to get FB user birthday, android?

I am trying to get some profile information of facebook user like name, email, birthday and location. I am not able to get the user's birthday. callbackManager = CallbackManager.Factory.create(); loginManager=LoginManager.getInstance(); loginManager.registerCallback(callbackManager, new FacebookCall...
WISHY
5

votes
1

answer
1.7k

views

Display a continuing progress bar in notification, android?

I am trying to display a indeterminate progress bar in the notification window. But it is not displayed. This is my code int id = 1; NotificationManager mNotifyManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); Builder mBuilder = new NotificationCompat.Builder( MenuActi...
WISHY
1

votes
1

answer
2k

views

Modify Logger's adoAppender.ConnectionString

I am using log4net. The problem is I create the connection string only after the application is started based on the connection string in the config file. This means the config file does not have a proper connection string yet. I am able to modify the connection string of the appender using this cod...
wishy
2

votes
1

answer
3.4k

views

Google sign in fragment , android?

Using android studio I am trying to sign in from a fragment Activity Code: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if(savedInstanceState==null) { F...
WISHY
5

votes
2

answer
11.1k

views

Ripple requires API level 21 (current min is 11), android?

I have the below drawable And I am getting this error requires API level 21 (current min is 11) How do I solve it?
WISHY
3

votes
3

answer
4.1k

views

Finish previous activities, android?

I have this application flow: Activity 1-> Activity 2-> Activity 3-> Home Activity Now when the user switches from Activity3 to Home Activity I want to finish off all the previous activities. So the user cannot go to the previous activities. I do not want use finish() as all the 3 activities form fi...
WISHY
1

votes
3

answer
337

views

What is the fastest way to lookup number in a bucket?

Assume there are 5 buckets with each bucket represented by an object, what is the fastest way to look up which bucket a given number belongs to using Java 8 ? For eg: List listOfBuckets = new ArrayList(); and each Bucket object has the following properties 'Buckets': [{ 'bucketName':'bucket1', 'low...
wishy
2

votes
2

answer
275

views

Allow limited keyboard digits in edit text, android? [duplicate]

This question already has an answer here: The entity name must immediately follow the '&' in the entity reference error in jasper reports 3 answers I want to allow only alphabets, numbers and some of the special characters in Edit text: android:digits='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst...
WISHY
2

votes
2

answer
2.6k

views

Proguard error android, unable to access jar file

This is the first time I am using progurad and getting the following error on exporting signed apk. Error: Unable to access jarfile ..\lib\proguard.jar I uncommented the proguard.config= line # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, use...
WISHY
3

votes
3

answer
13.4k

views

Get text of selected checkboxes android?

I have 5 checkboxes in my activity xml. I need to get the text of all the selected checkboxes. One approach is to see if checkbox1 ischecked() and get the text. if(checkbox1.isChecked()) { String text=checkbox1.getText().toString();} and so on. This becomes quite a lengthy process. Is there any oth...
WISHY

View additional