Asked Questions
Views
49
Answers
0

I am searching for 2 days for my problem and i had no luck in finding it.

my problem :

I have comodo ssl/tls certificate installed on my server, and I am using android volley library for connecting to server, until now i was using just \"https://...\" for my url and connecting via https connection to my server with no problem. but i recently installed \"packet capture\" android application on my phone, by default settings and a phone which is not rooted it cannot retrieve post/response information from my app to the server, but when you use a rooted phone, the packet capture app asks you to install a custom certificate on the phone so it can retrieve even ssl/tls connection, At first I though it\'s joking, but after installing the certificate it shows the whole information used in ssl connection to my server... I am so worried about the security of my app, which a hacker can use that capturing app to know what to send to my server and sets his coin number for example to 100000 :(

please show me a way to make my app\'s connection more secured . * I do\'nt have a custom certificate installed on the app because the server certificate is trusted and working ok with the default use.

sorry for my poor English typing :)

Edit : thanks to @Ch4t4r for the idea... I did searched and find this for pinning the public key and it\'s so great, here is the github link : https://github.com/faruktoptas/volley-public-key-pinning

hope it helps others having the same problem

Views
31
Answers
0

I am building my first app in android studio but my app crash when I try to open it. I am very new to this and I don\'t even know what I can show you to solve my problem.

 

What should I do to solve this problem?

 

This is what i get from logcat:

 

--------- beginning of crash 09-06 06:45:25.516 4182-4182/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.android.questionnaireapplication, PID: 4182 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.questionnaireapplication/com.example.android.questionnaireapplication.QuestionnaireActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x0 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0 at android.content.res.Resources.getText(Resources.java:331) at android.widget.TextView.setText(TextView.java:4554) at com.example.android.questionnaireapplication.QuestionnaireActivity.mettreÀJourQuestion(QuestionnaireActivity.java:38) at com.example.android.questionnaireapplication.QuestionnaireActivity.onCreate(QuestionnaireActivity.java:49) at android.app.Activity.performCreate(Activity.java:6662) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6077)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) 

Views
16
Answers
0
Views
17
Answers
0
Views
5
Answers
0
Views
7
Answers
0
Views
6
Answers
0
Views
19
Answers
0

In my Android Application i am trying to plot a horizontal BarGraph using MpAndroid Chart library but the values in X axis are not plotted correctly. E.g for plotting (6,15) cordinates on x Axis are displaying below 5.Please help to plot x Axis value properly . Here is my code ..

 

     mChart.setDrawBarShadow(false);

           mChart.setDrawValueAboveBar(true);

          mChart.getDescription().setEnabled(false);

          mChart.setMaxVisibleValueCount(60);

          mChart.setPinchZoom(true);

          mChart.setScaleEnabled(false);

          mChart.setDrawGridBackground(false);

           XAxis xl=mChart.getXAxis();

           xl.setPosition(XAxisPosition.BOTTOM);

 

        xl.setDrawAxisLine(false);

        //xl.setDrawGridLines(false);

        xl.setDrawGridLines(true);

        xl.setLabelCount(10,true);

        xl.setAxisMinValue(0f);

        xl.setAxisMaxValue(45f);

        xl.setGranularityEnabled(true);

        // xl.setGranularity(10f);

        xl.setCenterAxisLabels(false);

        xl.setGranularity(1f);

        YAxis yl=mChart.getAxisLeft();

        yl.setDrawAxisLine(true);

        // yl.setDrawGridLines(true);

        yl.setDrawGridLines(false);

        yl.setAxisMinimum(-50f); // this replaces setStartAtZero(true)

        //  yl.setInverted(true);

        yl.setLabelCount(6,true);

        yl.setAxisMinValue(-60f);

        yl.setAxisMaxValue(60f);

        yl.setGranularityEnabled(true);

        yl.setGranularity(10f);

        YAxis yr=mChart.getAxisRight();

        yr.setDrawAxisLine(false);

        yr.setDrawGridLines(false);

        yr.setAxisMinimum(-50f);

        yr.setLabelCount(10,true);

        yr.setAxisMinValue(-60f);

        yr.setAxisMaxValue(60f);

        yr.setGranularityEnabled(true);

        yr.setGranularity(10f);

        // yr.setInverted(true);

        setData();

        // mChart.setFitBars(true);

        YAxis rightYAxis=mChart.getAxisRight();

        rightYAxis.setEnabled(false); // to remove y axis at bottom

        Legend l=mChart.getLegend();

        l.setVerticalAlignment(Legend.LegendVerticalAlignment.BOTTOM);

        l.setHorizontalAlignment(Legend.LegendHorizontalAlignment.LEFT);

        l.setOrientation(Legend.LegendOrientation.HORIZONTAL);

        l.setDrawInside(false);

        l.setFormSize(8f);

        l.setXEntrySpace(4f);

        l.setEnabled(false);

        }

 

 

 

private void setData(){

        float barWidth=3.5f;

        float spaceForBar=4f;

        ArrayList<BarEntry>yVals1=new ArrayList<BarEntry>();

        ArrayList<Integer>yValues=new ArrayList<>();

 

        yVals1.add(new BarEntry(0*spaceForBar,5));

        yVals1.add(new BarEntry(10f,15));

Views
8
Answers
0

 

I am new in android development and trying to use ListView in my simple app. But it is not working and throwing error.

Here is the code of DisplayMessageActivity.java. I have created a String Array and putted value manually. I am calling resource ID using what we call custom adapter.

package com.example.myfirstapp;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

import java.util.List;

public class DisplayMessageActivity extends AppCompatActivity {
String[] mobileArray={\"A\", \"B\"};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_display_message);
        Intent intent=getIntent();
        String message=intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
        TextView textView=(TextView) findViewById(R.id.textView);
        textView.setText(message);
        System.out.println(\"seq\");
        ArrayAdapter adapter=new ArrayAdapter<String>(this, R.layout.activity_display_message, R.id.listView, mobileArray);
        System.out.println(\"seq2\");
        ListView listView=(ListView) findViewById(R.id.listView);
        System.out.println(\"seq3\");
        listView.setAdapter(adapter);
        System.out.println(\"seq44\");
    }
}

XML of activity_display_message.xml is below where I created one ListView.

Views
9
Answers
0
Edit Account
LOGIN INFORMATION
Change Settings
Email Notifications Notifications will be sent to abcd@gmail.com
Select option for your email notifications:
Mature / News Filter We'll send on email when new jobs are posted
Option 2 for email notification We'll send on email when new jobs are posted