RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / user-268043

Ruslan Chepizhko's questions

Martin Hope
Ruslan Chepizhko
Asked: 2020-08-28 13:47:02 +0000 UTC

使用 Jsoup 从 HTML 中获取价值

  • 0

有HTML。

<html>
     <head></head>
     <body>
      <current>
       <city id="693194" name="Solonytsivka">
        <coord lon="36" lat="50"></coord>
        <country>
         UA
        </country>
        <sun rise="2018-08-28T02:44:59" set="2018-08-28T16:28:24"></sun>
       </city>
       <temperature value="295.15" min="295.15" max="295.15" unit="kelvin"></temperature>
       <humidity value="35" unit="%"></humidity>
       <pressure value="1017" unit="hPa"></pressure>
       <wind>
        <speed value="3" name="Light breeze"></speed>
        <gusts></gusts>
        <direction value="100" code="E" name="East"></direction>
       </wind>
       <clouds value="0" name="clear sky"></clouds>
       <visibility value="10000"></visibility>
       <precipitation mode="no"></precipitation>
       <weather number="800" value="clear sky" icon="01d"></weather>
       <lastupdate value="2018-08-28T05:00:00"></lastupdate>
      </current>
     </body>
    </html>

你需要得到“693194”和“Solonytsivka”。

android
  • 1 个回答
  • 10 Views
Martin Hope
Ruslan Chepizhko
Asked: 2020-03-07 22:39:18 +0000 UTC

需要从静态方法调用非静态方法

  • 0

有一个静态方法:

public static void mCount(String str){

    }

您需要从中调用非静态方法并传递 str 参数:

public void setCredits(String str) {
        txtView.setText(str);
    }

如何更容易实施?

java
  • 2 个回答
  • 10 Views
Martin Hope
Ruslan Chepizhko
Asked: 2020-01-22 23:45:30 +0000 UTC

按周分组所有日期

  • 2

我以这种格式以字符串形式接收订单日期,2017-07-25T13:24:46+0300 并且我应该将所有日期分组为周。即例如本周某某订单完成,前一周有该订单等,并由周报组成一个String集合。

java
  • 1 个回答
  • 10 Views
Martin Hope
Ruslan Chepizhko
Asked: 2020-01-17 17:41:38 +0000 UTC

是否有针对反编译 android 应用程序的保护?

  • 9

有许多反编译程序可以立即使用来自 apk 的 java 源代码创建文件夹。但是有应用程序没有反编译,所以有保护。如何实现对 android 应用程序反编译的保护?任何地方都没有给出正常的答案!只有一般文档的链接。

android
  • 1 个回答
  • 10 Views
Martin Hope
Ruslan Chepizhko
Asked: 2020-01-13 19:22:00 +0000 UTC

Android 应用内结算 v3 库

  • 3

根据来自 GitHub 的库:“anjlab/android-inapp-billing-v3”在我的应用程序中实现了禁用广告。

public class HelpActivity extends Activity implements BillingProcessor.IBillingHandler{
    ScrollView scrollView;


    TextView mTextView;
    BillingProcessor bp;
    static final String Off_ADVERTISING = "off_advertising";
    String fileName = "data";
    boolean m_off_advertising = false;
    SharedPreferences sPref;



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_help);
        // Убираем панель уведомлений
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        scrollView = (ScrollView)findViewById(R.id.scrollView);


        try {
            readFileXML();
        } catch (IOException e) {
            e.printStackTrace();
        }
        mTextView = (TextView)findViewById(R.id.textView11);

//        String licenseKey = getResources().getString(R.string.license_key);
//        bp = new BillingProcessor(this, licenseKey, this);
        bp = new BillingProcessor(this, null, this);

        mTextView.setOnClickListener(new View.OnClickListener() {
            @SuppressLint("ShowToast")
            @Override
            public void onClick(View v) {
               // bp.purchase(HelpActivity.this, "off_advertising");
                bp.purchase(HelpActivity.this, "android.test.purch");
            }
        });
        if(m_off_advertising){
            //показываем рекламу
            mTextView.setText("не показываем рекламу");

        }
    }

    @Override
    public void onProductPurchased(@NonNull String productId, @Nullable TransactionDetails details) {

        mTextView.setText("Реклама убрана");
        m_off_advertising = true;
        saveData();
    }

    @Override
    public void onPurchaseHistoryRestored() {

//        mTextView.setText("Реклама восстановлена");
//        m_off_advertising = true;
//        saveData();
    }

    @Override
    public void onBillingError(int errorCode, @Nullable Throwable error) {

    }

    @Override
    public void onBillingInitialized() {

    }
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (!bp.handleActivityResult(requestCode, resultCode, data)) {
            super.onActivityResult(requestCode, resultCode, data);
        }
    }

    @Override
    protected void onPause() {
        saveData();
        super.onPause();
    }

    @Override
    protected void onResume() {

        try {
            readFileXML();
        } catch (IOException e) {
            e.printStackTrace();
        }

        super.onResume();
    }

    @Override
    public void onDestroy() {
        saveData();
        if (bp != null) {
            bp.release();
        }
        super.onDestroy();
    }


    void readFileXML() throws IOException {
        this.sPref = getSharedPreferences(this.fileName, 0);
        this.m_off_advertising = this.sPref.getBoolean(Off_ADVERTISING, false);

    }


    void saveData() {
        //Log.d(TAG, "m_off_advertising save " + this.m_off_advertising);
        this.sPref = getSharedPreferences(this.fileName, 0);
        SharedPreferences.Editor ed = this.sPref.edit();
        ed.putBoolean(Off_ADVERTISING, this.m_off_advertising);
        ed.commit();
    }


}

但是有2个但是: 第一:购买后,需要再次点击购买文字,才会显示购买。第二:恢复方法始终有效,并且执行其中写入的所有操作,无需检查产品 ID

 @Override
    public void onPurchaseHistoryRestored() {

//        mTextView.setText("Реклама восстановлена");
//        m_off_advertising = true;
//        saveData();
    }

如何对特定产品进行开机和恢复检查?

android
  • 1 个回答
  • 10 Views
Martin Hope
Ruslan Chepizhko
Asked: 2020-12-12 15:50:28 +0000 UTC

<action android:name="android.intent.action.PACKAGE_ADDED"/> 可以获得什么?

  • 0

BroadcastReceiver 和 ContentProvider 除了应用程序开、关事件还能接收什么?这是别人的代码安全吗?

       <provider
                    android:authorities="${applicationId}.elephantprovider"
                    android:name="com.elephant.data.ElephantDataProvider"
                    android:exported="true"
                    android:multiprocess="false"/>
                <receiver android:name="com.elephant.data.ElephantBroadcastReceiver">
                    <intent-filter>
                        <action android:name="android.intent.action.PACKAGE_ADDED"/>
                        <action android:name="android.intent.action.PACKAGE_REMOVED"/>
                        <data android:scheme="package"/>
                    </intent-filter>
                </receiver>

Декомпилированый jar:
package com.elephant.data;

    import android.content.BroadcastReceiver;
    import android.content.Context;
    import android.content.Intent;
    import com.elephant.data.p000a.C0016g;
    import com.elephant.data.p012g.C0082a;

    public class ElephantBroadcastReceiver extends BroadcastReceiver {
        static {
            String str = C0082a.af;
        }

        public void onReceive(Context context, Intent intent) {
            try {
                ((BroadcastReceiver) Class.forName(C0016g.class.getName()).newInstance()).onReceive(context, intent);
            } catch (Throwable th) {
            }
        }
    }

package com.elephant.data;

import android.content.ContentProvider;
import android.content.ContentValues;
import android.database.Cursor;
import android.net.Uri;
import com.elephant.data.p000a.C0018i;

public class ElephantDataProvider extends ContentProvider {
    public int delete(Uri uri, String str, String[] strArr) {
        return C0018i.m37a().m40a(uri, str, strArr);
    }

    public String getType(Uri uri) {
        C0018i.m37a();
        return C0018i.m38b();
    }

    public Uri insert(Uri uri, ContentValues contentValues) {
        return C0018i.m37a().m42a(uri, contentValues);
    }

    public boolean onCreate() {
        C0018i.m37a().m43a(getContext());
        return true;
    }

    public Cursor query(Uri uri, String[] strArr, String str, String[] strArr2, String str2) {
        return C0018i.m37a().m41a(uri, strArr, str, strArr2, str2);
    }

    public int update(Uri uri, ContentValues contentValues, String str, String[] strArr) {
        return C0018i.m37a().m39a(uri, contentValues, str, strArr);
    }
}

其他类别的垃圾。

android
  • 1 个回答
  • 10 Views
Martin Hope
Ruslan Chepizhko
Asked: 2020-11-25 18:08:40 +0000 UTC

如何将“菜单”绑定到 ImageView?

  • 2

而不是标准的“三点”放 ImageView。如何将“菜单”绑定到 ImageView ?

android
  • 1 个回答
  • 10 Views
Martin Hope
Ruslan Chepizhko
Asked: 2020-10-05 14:35:25 +0000 UTC

InterstitialAd 插页式广告仅展示一次

  • 1

有一个插页式广告:

//Создаём межстраничное объявление
interstitial = new InterstitialAd(this);
interstitial.setAdUnitId("ca-app-pub-****/****");
// Создаём запрос к AdMob
AdRequest adRequesti = new AdRequest.Builder().build();
// Начинаем загружать объявление
interstitial.loadAd(adRequesti);

public void displayInterstitial() {
        if (interstitial.isLoaded()) {
            interstitial.show();
        }
    }

@Override
    protected void onResume() {
        super.onResume();
        displayInterstitial();
    }

问题是广告只显示一次。我希望在点击此活动时始终显示广告。

android
  • 1 个回答
  • 10 Views
Martin Hope
Ruslan Chepizhko
Asked: 2020-10-03 20:00:03 +0000 UTC

是否可以从 Fragment 对 Activity 调用 finish() ?

  • 2

是否可以从forFragment调用?finish()Activity

android
  • 1 个回答
  • 10 Views
Martin Hope
Ruslan Chepizhko
Asked: 2020-09-27 15:17:03 +0000 UTC

输出时 text.setText(R.string.slovo + " " + intValue); - 输出资源int地址

  • 3

输出时text.setText(R.string.slovo + " " + intValue);显示资源int的地址,需要显示String资源的加号intValue。intValue动态变化,因此将其驱动到资源中是没有意义的。

android
  • 2 个回答
  • 10 Views
Martin Hope
Ruslan Chepizhko
Asked: 2020-09-24 01:50:39 +0000 UTC

当我点击按钮时,我只想调用 Intent.EXTRA_EMAIL,但所有社交网络都被调用

  • 4

对于反馈,当您单击按钮时,我只想调用邮件,但会调用一长串不同的程序。也许我把过滤器放错了?

Intent shareIntent = new Intent(Intent.ACTION_SEND);
                 shareIntent.setType(HTTP.PLAIN_TEXT_TYPE);
                 shareIntent.setType("text/plain");
                 shareIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { "trinka.online@gmail.com" });
                 shareIntent.putExtra(Intent.EXTRA_SUBJECT, "Вопрос:");
                 shareIntent.putExtra(Intent.EXTRA_TEXT, "текст вопроса");
                 startActivity(shareIntent);
android
  • 1 个回答
  • 10 Views
Martin Hope
Ruslan Chepizhko
Asked: 2020-09-24 01:10:35 +0000 UTC

如果没有您的设备不支持的 Google Play 服务,这将无法运行

  • 1

当您在 19 api 以下的设备上打开应用程序时,会出现一条消息:如果没有您的设备不支持的 Google Play 服务,这将无法运行。安装最低版本 16。

android
  • 1 个回答
  • 10 Views
Martin Hope
Ruslan Chepizhko
Asked: 2020-09-22 01:47:28 +0000 UTC

是否可以同时使用发布密钥和调试密钥签署应用程序?

  • 0

我使用 SHA 1 调试密钥发布了应用程序,然后尝试使用发布密钥进行更新。控制台不接受更新,它需要旧密钥。您真的必须使用发布密钥复制项目并将其重新上传到控制台吗?是否可以同时使用发布密钥和调试密钥签署应用程序?

android
  • 1 个回答
  • 10 Views
Martin Hope
Ruslan Chepizhko
Asked: 2020-09-21 19:04:10 +0000 UTC

从 Google Play 下载的应用程序已停止运行

  • 0

通过 Google 实施身份验证。在开发者控制台中以测试模式发布。在模拟器和真实设备上的 Android Studio 中一切正常,但从 Google Play 下载的应用程序不包含在帐户中。可能是什么问题呢?

android
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5