Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6340137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:46:49+00:00 2026-05-24T19:46:49+00:00

Currently I have a blank service, which will eventually be used to determine if

  • 0

Currently I have a blank service, which will eventually be used to determine if a licence has been purchased, this service is in an external app which its only job is to check, and verify the licence (external app: com.example.myapp.licence, main app: com.example.myapp)

com.example.myapp.licence > LicenceService.java:

public class LicenceService extends Service {

   @Override
   public IBinder onBind(Intent intent) {
      return null;
   }

   @Override
   public void onCreate() {

   }

   @Override
   public void onStart(Intent intent, int startid) {

   }
}

com.example.myapp.licence > AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.myapp.licence"
      android:sharedUserId="com.example.myapp"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="4" />

    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".My3DroidPaidLicenceActivity"
                  android:label="@string/app_name">
        </activity>
    <service android:enabled="true" android:name=".LicenceService" />
    </application>
</manifest>

but this service force-closes when called with the following from within my main app…

com.example.myapp > MainActivity.java:

 Intent intent = new Intent();
    intent.setClassName("com.example.myapp.licence", "com.example.myapp.licence.LicenceService");

    List<ResolveInfo> list = getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);

    if (list.size() > 0) {
        startActivity(intent);
    }

Can anyone please suggest why this is?

(my apologies if i have not explained anything very well)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T19:46:51+00:00Added an answer on May 24, 2026 at 7:46 pm

    Replace

        List<ResolveInfo> list = getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
    
    if (list.size() > 0) {
        startActivity(intent);
    }
    

    with

    startService( intent );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a ComponentArt Grid, which has a column containing DateTime values. In
I currently use an external service for a price comparison unit I have on
We currently have code like this: Dim xDoc = XDocument.Load(myXMLFilePath) The only way we
I currently have a functioning in-house Windows Forms application which extensively uses the DataGridView
I have a website which includes this RSS JavaScript. When I click feed, it
I currently have the following tests, which look like good candidates for a little
I have written a WCF service with the REST template that has the defaultOutgoingResponseFormat
I currently have a service setup that emails a bunch of files. What I
This is my first question here. I have been searching Stack Overflow and other
I have a small app which query our SharePoint server' Web Service interface for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.