Friday 15 January 2010

Two Eclipse Android Projects: One is a widget, one is a normal app. How to connect? -


I've helped on the development site:

Downside is my code to my app's class Search.

  intent to intent = new intent (reference, package for main activity; Pending pending vertical positioning = pending.activity (reference, 0, intent, 0); Remote power view = new remote power (context.getPackageName (), R.Lay Out.man); View.setOnClickPendingIntent (R.id.widget_textview, pending pending);   

Package for MainActivity is a completely separate project in Eclipse.

So I added the package for the menactivity for my widget, and put it in my widget in front of the order.

Create an order:

- & gt; The main activity package & lt; -

Widgets / src

Android 4.2.2

Android dependencies

The app is already on my emulator, and works fine Does.

The widget works fine without trying to connect to the app (so without those 4 lines)

What I find here, when I try to connect two , And is installed on the emulator:

[widget] ------------------------------

[Widget] Android Launch!

[Widget] ADB is running normally.

[Widget] No launcher activity found!

[Widget] Launch will only sync the application package on the device! [Widget] Sync

[Widget] Auto target mode: Compatible AVD 'NexusS' is running using the existing emulator 'emulator-5554' < P> [Get Width] widget on 'emulator-5554'. Uploading the app.

[Widget] Installing Widget.apk ...

[Widget ] Success! [Widget] found project dependence, installed: main activity

[main activity] already posted application. There is no need to reinstall.

[widget] / on / widget / bin / widget .apk install

[widget] done!

is thrown to the widget but does not work only shows the default string value. In the code in the code there is an error

  intent = new intent (reference, main & Lt; package for activity; silent activity class;);   

It basically says "class not found"

Any help on how to get this class? Should you try to link it before accepting?

Note that there are 0 problems with this code in Eclipse. It assumes that other projects have been imported, and classes can be made.

Google is great documentation You probably want to reveal your data with a content provider:



No comments:

Post a Comment